home *** CD-ROM | disk | FTP | other *** search
- property mySprite, myRect, myLoc, lastRoll, myType, HLinesList, targetSprite
-
- on beginSprite me
- global gActorListMan
- mySprite = me.spriteNum
- myRect = rect(93, 564, 258, 586)
- setUpRegions(me)
- myType = #windowClickTracker
- registerSprite(gActorListMan, mySprite)
- end
-
- on endSprite me
- global gActorListMan
- unRegisterSprite(gActorListMan, mySprite)
- end
-
- on stepFrame me
- global gCursorMan, gClickSprite
- if voidp(targetSprite) then
- targetSprite = sendAllSprites(#sendSpriteNum, #FloorPlanDisplay)
- end if
- thisRoll = rollover()
- if thisRoll = mySprite then
- setCursor(gCursorMan, #handNormal, myType)
- if (lastRoll <> mySprite) and not (the mouseDown) then
- lastRoll = mySprite
- exit
- end if
- if (gClickSprite = mySprite) and the mouseDown then
- lastRoll = me.mySprite
- setCursor(gCursorMan, #handNormal, myType)
- exit
- end if
- else
- if lastRoll = mySprite then
- lastRoll = 0
- setCursor(gCursorMan, #Arrow, myType)
- end if
- end if
- end
-
- on mouseDown me
- global gClickSprite
- if resWindowUp() or modalWindowUp() then
- exit
- end if
- gClickSprite = mySprite
- if voidp(targetSprite) then
- targetSprite = sendAllSprites(#sendSpriteNum, #FloorPlanDisplay)
- end if
- clickLoc = the clickLoc
- ClickH = clickLoc[1]
- if ClickH < HLinesList[1] then
- whichAction = 1
- else
- if ClickH < HLinesList[2] then
- whichAction = 2
- else
- if ClickH < HLinesList[3] then
- whichAction = 3
- else
- whichAction = 4
- end if
- end if
- end if
- put whichAction
- doButtonUpClick(myType, 1)
- sendSprite(targetSprite, #setDisplay, whichAction)
- end
-
- on setUpRegions me
- HLinesList = []
- myWidth = myRect[3] - myRect[1]
- inc = myWidth / 4
- append(HLinesList, myRect[1] + inc)
- append(HLinesList, myRect[1] + (inc * 2))
- append(HLinesList, myRect[1] + (inc * 3))
- end
-